﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using DataAnnotationsExtensions;

namespace HomeStayWebCP.Models.BusinessObject
{
    public class UserObject
    {
        //public int UserId { get; set; }
        public string Username { get; set; }
        public string Password { get; set; }
        public string OldPassword { get; set; }
        public string NewPassword { get; set; }
        public string RetypePassword { get; set; }
        [Required(ErrorMessage = "Full name is require")]
        public string Fullname { get; set; }
        public string AvatarPicture { get; set; }
        public string Gender { get; set; }
        //[Required(ErrorMessage = "Email is require")]
        //[Email(ErrorMessage = "wrong format")]
        public string Email { get; set; }
        [Required(ErrorMessage = "Address is require")]
        public string Address { get; set; }
        [Required(ErrorMessage = "Phone is require")]
        [RegularExpression("^[0-9]{9,15}$", ErrorMessage = "Not valid Phone number")]
        public string Phone { get; set; }
        public string Captcha { get; set; }
        public DateTime TimeCreated { get; set; }


    }
    //use in admin page
    public class UserInfo
    {
        public int UserId { get; set; }
        public string Username { get; set; }
        public string Fullname { get; set; }
        public string Role { get; set; }
        public string Email { get; set; }
        public string Phone { get; set; }
        public string Status { get; set; }
    }
}